import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.0
import QtQuick.XmlListModel 2.0

XmlListModel {
    id: modelCharacterClasses
    query: "/Campaign/CharacterClasses/CharacterClass"

    XmlRole { name: "className"; query: "attribute::name/string()" }
    XmlRole { name: "classAcronym"; query: "substring(attribute::name, 1, 3)" }
    XmlRole { name: "classHitDie"; query: "child::CharacterFeatures/child::HitDie/attribute::category/number()" }
    XmlRole { name: "classSkillPoints"; query: "child::CharacterFeatures/child::SkillPoints/attribute::category/number()" }

    XmlRole { name: "classSkills"; query: "string-join(child::Skills/child::Skill/attribute::name, ';')" }
    XmlRole { name: "classBaseAttack"; query: "child::CharacterFeatures/child::BaseAttackBonus/attribute::category/number()" }
}
